<?php
$current_page = "index.php";
$page_type = "";
require_once 'header.php';

echo ("<h2>Homepage</h2>");

if (empty($_SESSION['user_id'])) {
  echo ("<p>Welcome Visitor!</p>");
}
else if (isset($_SESSION['aflag']) and $_SESSION['aflag'] == "1")
  echo "<p>Welcome Administrator!</p>";
else if (isset($_SESSION['sflag']) and $_SESSION['sflag'] == "1")
  echo "<p>Welcome Student!</p>";
else 
  echo "<p>Welcome Student-Administrator!</p>";
?>
</body>
</html>